import { Form, Input, Button } from "antd";
import { useState } from "react";

export default function Login() {
  const [username, setUsername] = useState("");
  const [password, setPassword] = useState("");
  return (
    <div className="flex h-screen items-center justify-center">
      <Form layout="vertical" className="w-[300px]">
        <Form.Item label="账号">
          <Input
            placeholder="请输入账号"
            autoComplete="username"
            value={username}
            onInput={(e) => setUsername((e.target as HTMLInputElement).value)}
          />
        </Form.Item>
        <Form.Item label="密码">
          <Input
            placeholder="请输入密码"
            value={password}
            type="password"
            onInput={(e) => setPassword((e.target as HTMLInputElement).value)}
          />
        </Form.Item>
        <Form.Item>
          <Button htmlType="button" type="primary" className="w-full">
            登录
          </Button>
        </Form.Item>
      </Form>
    </div>
  );
}
